package com.liuwei.msmall.cart.feign;

import com.liuwei.msmall.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Classname ProductFeignService
 * @Description TODO
 * @Date 2020/6/28 13:32
 * @Created by 刘
 */
@FeignClient("msmall-product-service")
public interface ProductFeignService {

    //通过skuid查出sku详情
    @RequestMapping("/product/skuinfo/info/{skuId}")
    R getSkuInfo(@PathVariable("skuId") Long skuId);

    //通过skuid查出sku销售属性值
    @GetMapping("/product/skusaleattrvalue/saleValue/{skuid}")
    List<String> getSaleValues(@PathVariable("skuid") Long skuid);

    //通过skuId查出sku价格
    @GetMapping("/product/skuinfo/{skuId}/price")
    BigDecimal getPriceBySkuId(@PathVariable("skuId") Long skuId);

}
